/*
 Navicat Premium Data Transfer

 Source Server         : 本地rootroot
 Source Server Type    : MySQL
 Source Server Version : 80013
 Source Host           : 127.0.0.1:3306
 Source Schema         : zu

 Target Server Type    : MySQL
 Target Server Version : 80013
 File Encoding         : 65001

 Date: 03/06/2019 17:12:48
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for apply
-- ----------------------------
DROP TABLE IF EXISTS `apply`;
CREATE TABLE `apply` (
  `apply_id` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `area` double(255,0) DEFAULT NULL,
  `price` double(10,2) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `userlist_id` int(255) NOT NULL,
  `createdate` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`apply_id`,`house_id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for applyout
-- ----------------------------
DROP TABLE IF EXISTS `applyout`;
CREATE TABLE `applyout` (
  `aoid` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) DEFAULT NULL,
  `createdate` timestamp NOT NULL,
  PRIMARY KEY (`aoid`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for checkout
-- ----------------------------
DROP TABLE IF EXISTS `checkout`;
CREATE TABLE `checkout` (
  `cid` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) DEFAULT NULL,
  `createdate` timestamp NOT NULL,
  PRIMARY KEY (`cid`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for helpinfo
-- ----------------------------
DROP TABLE IF EXISTS `helpinfo`;
CREATE TABLE `helpinfo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `createdate` timestamp NOT NULL,
  `infotype` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

-- ----------------------------
-- Records of helpinfo
-- ----------------------------
BEGIN;
INSERT INTO `helpinfo` VALUES (6, '房屋租赁管理系统用户协议', '欢迎您使用租房管理系统的服务！为使用租房管理系统的服务，您应当阅读并遵守本《租房管理系统用户服务协议》（以下简称“本协议”）。本协议是用户与安居客之间的法律协议，是用户注册安居客账号并使用安居客平台服务或非经注册程序直接使用安居客平台服务时的通用条款。请您务必审慎阅读、充分理解本协议各条款内容，特别是免除或者限制责任的条款、管辖与法律适用条款。限制、免责条款可能以黑体加粗或加下划线的形式提示您重点注意。如果您不同意本协议的约定，您应立即停止注册程序或停止使用本平台服务；如您继续访问和使用本平台服务，即视为您已确知并完全同意本协议各项约定。', '2019-06-02 22:10:15', '用户协议');
INSERT INTO `helpinfo` VALUES (8, '房屋租赁管理系统房源发布规则', '1、 请勿发布已售/已租或不存在房源：房源不存在，或已经出售/出租但依然挂牌的房源信息，经核实后，视为违规房源，将对此类房源进行隐藏。 <br/>2、请勿发布价格、面积有误房源：房源价格实际价格与挂牌价格严重不符，建筑面积或使用面积明显有误，将视为违规房源，并对此类房源进行隐藏。 <br/>3、请勿发布内容违规房源：凡在房源描述里发布广告信息、与房源无关的信息、与本网站无关的网址链接，房源明显失实（包括楼层信息异常、建筑年代异常等情况）；在房源标题里发布经纪人姓名、手机号码、本网站名称等内容将视为违规房源，对房源进行隐藏。 <br/>4、请勿发布不实图片：房源信息中图片与真实房源情况无关，图片模糊不清、户型图与户型填写不符，图片未按分类放置、图片有经纪人姓名、电话号码等情况，将视为违规房源，并对此类房源进行隐藏。 <br/>5、请勿发布重复房源：重复发布的房源，包括房源价格、楼层、小区、面积相同的房源，将视为违规房源，并对此类房源进行隐藏。 <br/>6、请勿单条房源中包含多个小区名：以多小区信息作为楼盘名称、楼盘地址或房源标题等，视为违规房源，将对此类房源进行隐藏。 <br/>7、请勿剽窃他人房源信息：未经原作者同意，擅自复制其文字、图片内容，不做任何修改或文字与原内容相似度90%以上，视为房源信息盗用，将进行警告，并删除盗用信息。', '2019-06-02 23:02:30', '房源发布规则');
INSERT INTO `helpinfo` VALUES (9, '房屋租赁管理系统虚假房源治理规则', '您好，如果您发现虚假房源可以点击页面内的举报房源，我们相关部门如果核实成立会删除虚假房源，感谢您对本平台的支持。', '2019-06-02 23:06:00', '虚假房源治理规则');
COMMIT;

-- ----------------------------
-- Table structure for hetong
-- ----------------------------
DROP TABLE IF EXISTS `hetong`;
CREATE TABLE `hetong` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `chuzu` varchar(255) DEFAULT NULL,
  `chuzu_idcard` varchar(255) DEFAULT NULL,
  `zuke` varchar(255) DEFAULT NULL,
  `zuke_idcard` varchar(255) DEFAULT NULL,
  `fromdate` varchar(255) DEFAULT NULL,
  `todate` varchar(255) DEFAULT NULL,
  `price` double(10,2) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `house_id` varchar(255) DEFAULT NULL,
  `payday` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of hetong
-- ----------------------------
BEGIN;
INSERT INTO `hetong` VALUES (26, '房东李先生', '11028943755693385', '老王', '110857699322743499', '2019-06-01', '2019-07-31', 7000.00, '石园北区85号楼', 'H-001', 2);
INSERT INTO `hetong` VALUES (27, '房东李先生', '11028943755693385', '求租者老张', '1104444444444446', '2019-06-22', '2019-10-31', 3500.00, '天津市河东区', 'H-0003', 12);
COMMIT;

-- ----------------------------
-- Table structure for houselist
-- ----------------------------
DROP TABLE IF EXISTS `houselist`;
CREATE TABLE `houselist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `houseid` varchar(255) NOT NULL,
  `address` varchar(255) NOT NULL,
  `area` double DEFAULT NULL,
  `price` double(10,2) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `userid` int(11) DEFAULT NULL,
  `createdate` timestamp NOT NULL,
  `huxing` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`,`houseid`)
) ENGINE=InnoDB AUTO_INCREMENT=48 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of houselist
-- ----------------------------
BEGIN;
INSERT INTO `houselist` VALUES (45, 'H-001', '石园北区85号楼', 80, 7000.00, '已租赁', 20, '2019-06-01 06:25:38', '两室一厅');
INSERT INTO `houselist` VALUES (47, 'H-0003', '天津市河东区', 60, 3500.00, '已租赁', 22, '2019-06-01 10:14:40', '一室一厅');
COMMIT;

-- ----------------------------
-- Table structure for paid
-- ----------------------------
DROP TABLE IF EXISTS `paid`;
CREATE TABLE `paid` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `price` double(10,2) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `paydate` date DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of paid
-- ----------------------------
BEGIN;
INSERT INTO `paid` VALUES (13, 'H-001', '石园北区85号楼', 7000.00, '2019-06-07', '2019-06-02', '老王', 21, '租金已缴');
INSERT INTO `paid` VALUES (14, 'H-0003', '天津市河东区', 3500.00, '2019-06-07', '2019-06-02', '求租者老张', 24, '租金已缴');
INSERT INTO `paid` VALUES (15, 'H-001', '石园北区85号楼', 7000.00, '2019-07-12', '2019-06-03', '老王', 21, '租金已缴');
COMMIT;

-- ----------------------------
-- Table structure for schedule
-- ----------------------------
DROP TABLE IF EXISTS `schedule`;
CREATE TABLE `schedule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date` varchar(255) DEFAULT NULL,
  `content` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for solve
-- ----------------------------
DROP TABLE IF EXISTS `solve`;
CREATE TABLE `solve` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `detail` text,
  `name` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for topaid
-- ----------------------------
DROP TABLE IF EXISTS `topaid`;
CREATE TABLE `topaid` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `price` double(10,2) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of topaid
-- ----------------------------
BEGIN;
INSERT INTO `topaid` VALUES (10, 'H-0003', '天津市河东区', 3500.00, '2019-06-12', '求租者老张', 24, '租金未缴');
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `usertype` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `createdate` timestamp NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `u-key` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES (1, 'admin', '000000', 'admin', '2019-05-23 09:57:29');
INSERT INTO `user` VALUES (20, 'fangdong', '000000', 'fangdong', '2019-05-30 02:08:03');
INSERT INTO `user` VALUES (21, 'zuke', '000000', 'zuke', '2019-05-30 02:20:00');
INSERT INTO `user` VALUES (22, 'fangdong2', '000000', 'fangdong', '2019-05-30 02:24:15');
INSERT INTO `user` VALUES (24, 'zuke2', '000000', 'zuke', '2019-06-01 09:33:54');
COMMIT;

-- ----------------------------
-- Table structure for userlist
-- ----------------------------
DROP TABLE IF EXISTS `userlist`;
CREATE TABLE `userlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `idcard` varchar(255) NOT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  PRIMARY KEY (`id`,`idcard`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of userlist
-- ----------------------------
BEGIN;
INSERT INTO `userlist` VALUES (20, '房东李先生', '11028943755693385', '13708962940', 20);
INSERT INTO `userlist` VALUES (21, '老王', '110857699322743499', '15919213401', 21);
INSERT INTO `userlist` VALUES (24, '求租者老张', '1104444444444446', '15910888888', 24);
COMMIT;

-- ----------------------------
-- Table structure for wrong
-- ----------------------------
DROP TABLE IF EXISTS `wrong`;
CREATE TABLE `wrong` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `date` date DEFAULT NULL,
  `detail` text,
  `name` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for zulist
-- ----------------------------
DROP TABLE IF EXISTS `zulist`;
CREATE TABLE `zulist` (
  `zid` int(11) NOT NULL AUTO_INCREMENT,
  `house_id` varchar(255) NOT NULL,
  `price` double(10,2) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `userlist_id` int(11) NOT NULL,
  `contract_id` int(11) NOT NULL,
  PRIMARY KEY (`zid`,`house_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of zulist
-- ----------------------------
BEGIN;
INSERT INTO `zulist` VALUES (19, 'H-001', 7000.00, '石园北区85号楼', 21, 26);
INSERT INTO `zulist` VALUES (20, 'H-0003', 3500.00, '天津市河东区', 24, 27);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
